---伤害的[0]%转化为生命值
---@class BuffEffect2001200:BaseBuffEffect
BuffEffect2001200 = ClientFight.CreateClass("BuffEffect2001200",ClientFight.BaseBuffEffect)
local t = BuffEffect2001200
---@param fight Fight
---@param buff FighterBuff
function t:action(fight, buff, ...)
    local parameters = {...}
    if (FighterStateEnum.is(buff.target,FighterStateEnum.BAN_HEAL)) then
        return IBuffEffect.FAIL;
    end
    if (buff.target:isDie()) then
        return IBuffEffect.FAIL;
    end
    if (#parameters < 3) then
        return ClientFight.BaseBuffEffect.action(self,fight, buff, ...);
    end
    if (not (parameters[3].__cname == FightResult.__cname)) then
        return ClientFight.BaseBuffEffect.action(self,fight, buff, ...);
    end
    local fightResult = parameters[3];
    if (not AttackUtils.isDamage(fightResult.state())) then
        return ClientFight.BaseBuffEffect.action(self,fight, buff, ...);
    end
    if (not fightResult:isDamage()) then
        return ClientFight.BaseBuffEffect.action(self,fight, buff, ...);
    end
    local effectVal = buff.buffBean.f_BuffEffectValue
    local damage = fightResult:getDamage();

    local addHp = math.floor(damage* Utils.toRatio(effectVal[1]));
    DamageManager.setFighterHp(fight, buff.target, buff.target, nil, DamageResultTypeEnum.HEAL,addHp,
    buff.target.hp + addHp, true, false, true);
    SkillRoleMgr.savePathFile( "[" .. fight.frame .. "][EFFECT]Fighter " .. buff.target.fighterId .. " Buff:"
    ..buff.modelId .. " 伤害转换生命值:" ..addHp);
    return ClientFight.BaseBuffEffect.action(self,fight, buff, ...);
end
t.New()